import service from '@/utils/request'

// 获取到期预警
export function GetDateWarning(data) {
  return service.request({
    method: 'post',
    url: '/out/selectByDate',
    data
  })
}

// 通过仓库Id获取库存
export function GetStockInfo(data) {
  return service.request({
    method: 'get',
    url: '/out/findStock.do?warehouseId='+data,
  })
}
// 通过仓库Id获取库存详情分页
export function GetStockDetail(data) {
  return service.request({
    method: 'post',
    url: '/Stockdetails/getStock',
    data
  })
}
// 分页查看库存
export function GetStockInfoPage(data) {
  return service.request({
    method: 'post',
    url: '/put/getStock',
    data
  })
}
// 搜索库存
export function SearchStockInfo(data) {
  return service.request({
    method: 'post',
    url: '/corder/searchStockAll',
    data
  })
}
// 搜索库存清单
export function SearchStockDetail(data) {
  return service.request({
    method: 'post',
    url: '/Stockdetails/searchStock',
    data
  })
}

// 搜索出库单
export function SearchOutStore(data) {
  return service.request({
    method: 'post',
    url: '/out/selectByAll.do',
    data
  })
}

// 出库信息上传
export function OutStore(data) {
  return service.request({
    method: 'post',
    url: '/out/insert.do',
    data
  })
}
// 查看所有出库单
export function GetOutOrder() {
  return service.request({
    method: 'get',
    url: '/out/findOrderAll.do',
  })
}
// 查看所有出库单分页
export function GetOutOrderPage(data) {
  return service.request({
    method: 'post',
    url: '/out/getDord',
    data
  })
}
// 删除出库单
export function DelOutOrder(data) {
  return service.request({
    method: 'get',
    url: '/out/deleteOutStorageById.do?outId='+data,
  })
}
// 根据ID查看出库单
export function FindOutOrderById(data) {
  return service.request({
    method: 'get',
    url: '/out/findOutAll.do?outId='+data,
  })
}
// 根据ID修改出库单
export function UpdateOutOrder(data) {
  return service.request({
    method: 'post',
    url: '/out/updateDorderdetails.do',
    data
  })
}

// 提交出库单
export function SubmitOutOrder(data) {
  return service.request({
    method: 'get',
    url: '/out/submitAddDorderdetails.do?outId='+data,
  })
}
